package com.alisls.demo.sso.crm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * 登出管理
 *
 * @author Ke Wang
 */
@Controller
public class LogoutController {

    @RequestMapping("/logout")
    @ResponseBody
    public void logout(HttpSession httpSession) {
        httpSession.invalidate();
        System.out.println("失效SessionId为：" + httpSession.getId() + "的会话");
    }

}
